package praktikumid.w09.p4;

import java.awt.BorderLayout;

import javax.swing.JFrame;

/**
 * Frame.
 * @author Ago
 *
 */
public class MyFrame extends JFrame {
	
	/**
	 * Private reference to the draw panel.
	 */
	private DrawPanel dp;
	
	/**
	 * Constructor of the frame. Does all the 
	 * necessary initialization.
	 */
	public MyFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setSize(600, 600);
		
		ButtonPanel bp = new ButtonPanel(this);
		getContentPane().add(bp, BorderLayout.SOUTH);
		
		dp = new DrawPanel();
		getContentPane().add(dp, BorderLayout.CENTER);
	}
	
	/**
	 * Getter (get method) for the draw panel.
	 * Private variables should be accessible via
	 * get and set methods (getters and setters).
	 * @return Reference to the DrawPanel.
	 */
	public DrawPanel getDrawPanel() {
		return dp;
	}
}
